const Service = require("egg").Service;

class CarouselService extends Service {
  async query() {
    return await this.ctx.model.Carousel.find({});
  }

  async delete(_ids) {
    return await this.ctx.model.Carousel.deleteMany({
      _id: { $in: _ids }
    });
  }

  async add(carousel) {
    return await this.ctx.model.Carousel.create(carousel);
  }
}
module.exports = CarouselService;
